import React from 'react'
import { useLocation, useInRouterContext } from 'react-router-dom'

export default function Details() {

  const { state: { id, title, content } } = useLocation();
  const a = useInRouterContext();
  console.log("a = ", a);

  return (
    <ul>
      <li>消息ID: {id}</li>
      <li>消息标题: {title}</li>
      <li>消息内容: {content}</li>
    </ul>
  )
}
